export const defaultConfig = {
  basicWidth: 708,
  basicHeight: 316,
  minWidth: 80,
  minHeight: 80,
  minFont: 10,
  maxFont: 100,
  minDescPadding: 0,
  maxDescPadding: 100,
  minLineHeight: 1,
  maxLineHeight: 10,
  contactMarginTop: {
    newPage: 50,
    onePage: 20,
  },
  descMarginTop: 20,
}
export const defaultForm = {
  basicWidth: 708,
  basicHeight: 316,
  basicBackground: 'color', // img
  basicBackgroundColorType: 'single', // gradient
  basicBackgroundColor: '#000000',
  basicBackgroundImg: null,
  basicBackgroundMaskCheck: true,
  basicBackgroundMaskColor: '#000000',
  basicBackgroundMaskOpacityCheck: true,
  basicBackgroundMaskOpacity: 50,
  companyName: '',
  companyFontFamily: 'SimHei',
  companyFontColor: '#0ECB44',
  companyFontSize: 40,
  companyFontBold: false,
  companyFontItalic: false,
  contactName: '',
  contactFontFamily: 'SimHei',
  contactFontColor: '#ffffff',
  contactMarginTop: 50,
  contactFontSize: 30,
  contactFontBold: false,
  contactFontItalic: false,
  descNewPage: true,
  desc: '',
  descMarginTop: 20,
  descFontFamily: 'SimHei',
  descFontColor: '#ffffff',
  descFontSize: 20,
  descFontBold: false,
  descFontItalic: false,
  descPaddingTopBottom: 20,
  descPaddingLeftRight: 20,
  descLineHeight: 1.5,
}

// 接口字段对应表
export const fieldList = {
  width: 'basicWidth',
  height: 'basicHeight',
  is_backcolor_or_img: 'basicBackground',
  background_color: 'basicBackgroundColor',
  back_img_url: 'basicBackgroundImg',
  back_mask: 'basicBackgroundMaskColor',
  mask_tm_val: 'basicBackgroundMaskOpacity',

  company_name: 'companyName',
  company_font: 'companyFontFamily',
  company_font_color: 'companyFontColor',
  company_font_size: 'companyFontSize',
  is_company_bold: 'companyFontBold',
  is_company_xt: 'companyFontItalic',

  contact_info: 'contactName',
  contact_font: 'contactFontFamily',
  contact_font_color: 'contactFontColor',
  contact_font_size: 'contactFontSize',
  is_contact_bold: 'contactFontBold',
  is_contact_xt: 'contactFontItalic',
  contact_margin: 'contactMarginTop',

  is_two_page: 'descNewPage',
  ad_words: 'desc',
  ad_font: 'descFontFamily',
  ad_font_color: 'descFontColor',
  ad_font_size: 'descFontSize',
  is_ad_bold: 'descFontBold',
  is_ad_xt: 'descFontItalic',
  up_down_margin: 'descPaddingTopBottom',
  left_right_margin: 'descPaddingLeftRight',
  line_height: 'descLineHeight',
  ad_top_margin: 'descMarginTop',
}

export const fontList = [
  {
    type: 'system',
    label: '宋体',
    value: 'SimSun',
  },
  {
    type: 'system',
    label: '黑体',
    value: 'SimHei',
  },
  {
    type: 'system',
    label: '楷体',
    value: 'KaiTi',
  },
  {
    type: 'system',
    label: '仿宋',
    value: 'FangSong',
  },
  {
    type: 'customer',
    label: '阿里巴巴普惠体',
    value: 'AlibabaPuHuiTiAll',
    pathList: [
      { weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/AlibabaPuHuiTiAll.otf' },
      { weight: 'bold', url: 'https://recycleimg.feijiu.net/zft/font/AlibabaPuHuiTiAll-Bold.otf' },
    ],
    download: false,
  },
  {
    type: 'customer',
    label: '一点明体',
    value: 'ydmt',
    pathList: [{ weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/ydmt.ttf' }],
    download: false,
  },
  {
    type: 'customer',
    label: '仓耳非白',
    value: 'cefb',
    pathList: [
      { weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/cefb.ttf' },
      { weight: 'bold', url: 'https://recycleimg.feijiu.net/zft/font/cefb-Bold.ttf' },
    ],
    download: false,
  },
  {
    type: 'customer',
    label: '优设标题黑',
    value: 'ysbth',
    pathList: [{ weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/ysbth.ttf' }],
    download: false,
  },
  {
    type: 'customer',
    label: '卓健橄榄简体',
    value: 'zjgljt',
    pathList: [{ weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/zjgljt.ttf' }],
    download: false,
  },
  {
    type: 'customer',
    label: '峰广明锐体',
    value: 'fgmrt',
    pathList: [{ weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/fgmrt.ttf' }],
    download: false,
  },
  {
    type: 'customer',
    label: '思源宋体',
    value: 'syst',
    pathList: [
      { weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/syst.otf' },
      { weight: 'bold', url: 'https://recycleimg.feijiu.net/zft/font/syst-Bold.otf' },
    ],
    download: false,
  },
  {
    type: 'customer',
    label: '方正楷体',
    value: 'fzkt',
    pathList: [{ weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/fzkt.TTF' }],
    download: false,
  },
  {
    type: 'customer',
    label: '正风毛笔字体',
    value: 'zfmbzt',
    pathList: [
      { weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/zfmbzt.ttf' },
      { weight: 'bold', url: 'https://recycleimg.feijiu.net/zft/font/zfmbzt-Bold.ttf' },
    ],
    download: false,
  },
  {
    type: 'customer',
    label: '江城圆体',
    value: 'jcyt',
    pathList: [
      { weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/jcyt.ttf' },
      { weight: 'bold', url: 'https://recycleimg.feijiu.net/zft/font/jcyt-Bold.ttf' },
    ],
    download: false,
  },
  {
    type: 'customer',
    label: '江城尖刃黑',
    value: 'jcjrh',
    pathList: [{ weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/jcjrh.ttf' }],
    download: false,
  },
  {
    type: 'customer',
    label: '演示悠然小楷',
    value: 'ysyrxk',
    pathList: [{ weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/ysyrxk.ttf' }],
    download: false,
  },
  {
    type: 'customer',
    label: '锐字真言',
    value: 'rzzy',
    pathList: [{ weight: 'normal', url: 'https://recycleimg.feijiu.net/zft/font/rzzy.ttf' }],
    download: false,
  },
]

export const colorList = [
  '#000000',
  '#333333',
  '#555555',
  '#7f7f7f',
  '#aaaaaa',
  '#d7d7d7',
  '#f2f2f2',
  '#ffffff',
  '#ec808d',
  '#facd91',
  '#ffff80',
  '#caf982',
  '#80ffff',
  '#81d3f8',
  '#8080ff',
  '#c280ff',
  '#d9001b',
  '#f59a23',
  '#ffff00',
  '#95f204',
  '#00ffff',
  '#02a7f0',
  '#0000ff',
  '#8400ff',
  '#a30014',
  '#b8741a',
  '#bfbf00',
  '#70b603',
  '#00bfbf',
  '#027db4',
  '#0000bf',
  '#6300bf',
  '#6d000e',
  '#7b4d12',
  '#808000',
  '#4b7902',
  '#008080',
  '#015478',
  '#000080',
  '#420080',
]

export const gradientList = [
  {
    id: 0,
    list: ['#FDEB71', '#F8D800'],
  },
  {
    id: 1,
    list: ['#ABDCFF', '#0396FF'],
  },
  {
    id: 2,
    list: ['#FEB692', '#EA5455'],
  },
  {
    id: 3,
    list: ['#CE9FFC', '#7367F0'],
  },
  {
    id: 4,
    list: ['#90F7EC', '#32CCBC'],
  },
  {
    id: 5,
    list: ['#FFF6B7', '#F6416C'],
  },
  {
    id: 6,
    list: ['#81FBB8', '#28C76F'],
  },
  {
    id: 7,
    list: ['#E2B0FF', '#9F44D3'],
  },
  {
    id: 8,
    list: ['#F97794', '#623AA2'],
  },
  {
    id: 9,
    list: ['#FCCF31', '#F55555'],
  },
  {
    id: 10,
    list: ['#F761A1', '#8C1BAB'],
  },
  {
    id: 11,
    list: ['#43CBFF', '#9708CC'],
  },
  {
    id: 12,
    list: ['#5EFCE8', '#736EFE'],
  },
  {
    id: 13,
    list: ['#FAD7A1', '#E96D71'],
  },
  {
    id: 14,
    list: ['#FFD26F', '#3677FF'],
  },
]
